﻿
@{
    ViewBag.Title = ViewData["selected"] + " - 咕嘟咕嘟";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
}
@section head{
    <script src="~/js/jquery-1.11.3.min.js"></script>
    <script src="~/js/jquery.lazyload.js"></script>
<link href="~/static/css/layui.css" rel="stylesheet" />

}

@section blurWrap{
    <div class="blurWrap" id="shop">
}
@using Beauty.Model
<!--首页banner开始-->
<div class="timeLimit">
    <a href="#" title="简历模板分享减价" alt="简历模板分享减价">
        <img src="~/images/banner.jpg">
    </a>
</div>
<!--首页banner结束-->
<!--筛选开始-->
<!--筛选结束-->
<!--内容区域开始-->
<ul class="filterResultWrap" id="wrap">

    @if (ViewData["albums"] != null)
    {
        int i = 0;
        foreach (var item in (List<picalbum>)ViewData["albums"])
        {
            i++;
            <li id="@string.Format("view{0}-item",i)">
                <a class="use" href="/items/@item.AlbumId" target="_blank">

                    @*<img src="@item.CoverSrc" alt="">*@
                    <img class="lazy" src="~/images/placeholder.png" data-original="@item.CoverSrc">

                </a>
                <div class="tempIntro">
                    <p style="width:210px;"><a href="/items/@item.AlbumId" target="_blank">@item.Title</a></p>
                    
                    @*<span class="price">￥ 7.50</span>*@
                </div>
            </li>
        }
    }
</ul>
<!--内容区域结束-->


<script>
    jQuery.noConflict();//别的js文件冲突了 这里解决下
    jQuery("img.lazy").lazyload({
        effect: "fadeIn",
        failure_limit: 10,


    });
    
    $("li[query]").click(function () {
        
        //地址：albums/栏目
        //alert($(this).attr("pinyin"));
        var id = $(this).attr("pinyin");
        if (location.href.toLowerCase().indexOf("albums/") != -1) {
            location.href = id;
        } else {

            location.href = "http://" + location.host + "/Albums/" + id;
        }

        //地址：/栏目
        //var id = $(this).attr("pinyin");
        //location.href = id;
    })

</script>
